<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>一个未定义变量</title>
</head>

<body>
    <h2>JavaScript 数据类型</h2>

    <p>无值变量的值和数据类型是 <b>undefined</b>。</p>

    <p id="demo"></p>
    <script>
        var car;
        document.getElementById("demo") .innerHTML = car +"<br>" + typeof car;
    </script>
</body>

</html>